// import Vue from 'vue'
import VueRouter from 'vue-router'

VueRouter.prototype.goBack = function () {
    this.isBack = true
    window.history.go(-1)
}

Vue.use(VueRouter)

const PageTransition = r => require.ensure([], () => r(require('@/components/PageTransition')), '动画页');
const home = r => require.ensure([], () => r(require('@/page/home/index')), '首页');
const success = r => require.ensure([], () => r(require('@/page/success/index')), '邀请函');

const routes = [{
    path: '/',
    name: 'PageTransition',
    component: PageTransition,
    children: [
        {
        path: '',
        component: home,
        meta:{
            footerVisible:true
        }
    },{
        path: '/success',
        component: success
    }]
}]


const router = new VueRouter({
    routes
});

export default router